/*************************************************************************
	> File Name: B2122.cpp
	> Author: 
	> Mail: 
	> Created Time: 
 ************************************************************************/
#include <iostream>
#include <stack>
using namespace std;

int main() {
    string wd;
    while (cin >> wd) {
        stack<char> s;
        for (int i = 0; i < wd.size(); i++) s.push(wd[i]);
        while (!s.empty()) {
            cout << s.top();
            s.pop();
        }
        cout << endl;
    }
    return 0;
}
